Cube with anechoic condition (3D - Interior)
Importing related packages
using LinearAlgebra, BoundaryIntegralEquations, IterativeSolvers, Plots, MeshViz, SpecialFunctions
import WGLMakie as wgl # WGLMakie integrates into VSCode. Other backends can also be used.
wgl.set_theme!(resolution=(800, 800))Loading Mesh
Loading and visualizing the triangular cube mesh
mesh_file = joinpath(dirname(pathof(BoundaryIntegralEquations)),"..","examples","meshes","1m_cube_extra_coarse");
physics_orders = [:linear,:geometry,:disctriconstant,:disctrilinear,:disctriquadratic];
mesh = load3dTriangularComsolMesh(mesh_file;geometry_order=:linear, physics_order=physics_orders[5])
bc_pre = [1] .- 1; # The .-1 is due to COMSOL 0-indexing of exported entities
bc_ana = [6] .- 1; # The .-1 is due to COMSOL 0-indexing of exported entitiesCreating simple meshes for full mesh and boundary condition
simple_mesh = create_bc_simple_mesh(mesh,[bc_pre; bc_ana],false);
simple_pre = create_bc_simple_mesh(mesh,bc_pre);
simple_ana = create_bc_simple_mesh(mesh,bc_ana);We now plot the mesh with the pressure condition shown in red and the anechoic condition shown in blue
viz(simple_mesh;showfacets=true)
viz!(simple_pre;showfacets=true,color=:red)
viz!(simple_ana;showfacets=true,color=:blue)
wgl.current_figure()